package Duoxiancheng.FutureMode;

public class Client {
    public static void main(String[] args) throws InterruptedException {
        Client client = new Client();
        Data futureData = client.getRequest();
        System.out.println("处理其他逻辑");
        System.out.println(futureData.getResult());

    }

    public Data getRequest(){
        FutureData futureData = new FutureData();
        new Thread(new Runnable() {
            @Override
            public void run() {
                Data data = new RealData();
                futureData.setResult(data);
            }
        }).start();
        return futureData;
    }
}
